package gossbs;

import java.util.Scanner;

public class marry {
	public static void main(String[ ] args) {
		// 1.변수선언
		int married; //결혼여부 , 0:미혼, 1:기혼
		int salary; //연봉
		double tax = 0;  //초기화 필수
		String title1 = "결혼여부를 입력하세요(0:미혼, 1:기혼)";
		String title2 = "연봉을 입력하세요";
		Scanner sc = null;
		
		//2 결혼여부, 연봉입력 및 세금계산
		sc = new Scanner(System.in);
		System.out.println(title1);
		married = sc.nextInt();
		System.out.println(title2);
		salary = sc.nextInt();
		
		if (married == 0){
			if (salary < 3000){tax = salary * 0.05 ;}
			else if(salary >= 3000){tax = salary * 0.1 ;}
		}
		if (married == 1){
			if (salary < 5000){tax = salary * 0.15 ;}
			else if(salary >= 5000){tax = salary * 0.3 ;}

	}
	sc.close();
	
	//3 결과출력
	System.out.println(married);
	System.out.println(salary);
	System.out.println(tax);
}
}

